home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / GMSMTH01.ZIP / DEMO.DOC < prev    next >
Encoding:
Text File  |  1995-12-22  |  4.5 KB  |  213 lines

  1.  
  2.     demo.doc
  3.  
  4.     Internet: alexad3@icebox.iceonline.com
  5.     Copyright 1995, April 14 by Alec Russell, ALL rights reserved
  6.  
  7.     Created - 1995/4/14
  8.  
  9.  
  10.     Very useful for quick intro sequences for games.
  11.  
  12.     compile scripts with spc.exe
  13.     Show scripts with dsrpcshw.exe
  14.  
  15.  
  16. commands -------------------------------------------
  17.  
  18. *       Starts a comment line which is ignored by the complier.
  19.         Must the FIRST character on the line.
  20.  
  21. done    Unloads and frees shape, no longer drawn of course.
  22.         For current set only
  23.         0x01
  24.  
  25. quit    Unloads ALL shapes, global quit.
  26.         REQUIRED to exit! Must be in at least one set!
  27.         0x02
  28.  
  29. start   Starts all - REQUIRED command
  30.         Sets tick to 0
  31.         0x03
  32.  
  33. back x,y fname
  34.         Load the background picture at x,y.
  35.         This command can be outside of a set.
  36.  
  37.         allowed types:
  38.  
  39.         pbm 
  40.         lbm
  41.         pcx
  42.         bbm
  43.         pbm
  44.         m13
  45.         pkb
  46.  
  47.         0x04 followed by two ints
  48.  
  49. setstart 
  50.         Must start all the commands for one bit map.
  51.         0x05
  52.  
  53. setend
  54.         Must end all the commands for a set
  55.         0x06
  56.  
  57. load fname
  58.         Must be followed by a filename to load, must be a bit map
  59.         type. Can be loaded anytime in a set, will replace current shape
  60.         if one already loaded. Changing types OK.
  61.  
  62.         pbm - may be clipped, no scaling
  63.         m13 - may be scaled, clipping supported
  64.         cbm - can only be moved
  65.         pkb - can only be moved
  66.  
  67.         load shape1.pbm
  68.         load shape2.cbm
  69.         load shape3.m13
  70.  
  71.         0x07 followed by assciZ filename
  72.  
  73.  
  74. x=      Sets x position, no checking done for valid position,
  75.         default is zero.
  76.  
  77.         0x08 followed by one int
  78.  
  79. y=      Sets y position, no checking done for valid position,
  80.         default is zero.
  81.         
  82.         0x09 followed by one int
  83.  
  84. dx=     Sets dx for motion control,
  85.         default is zero.
  86.         
  87.         0x0a followed by one int
  88.  
  89. dy=     Sets dy for motion control,
  90.         default is zero.
  91.  
  92.         0x0b followed by one int
  93.  
  94.         For scalable bitmaps only ----------------
  95.  
  96. sw=     Set width for scalable bitmaps,
  97.         default is width.
  98.  
  99.         0x0c followed by one int
  100.  
  101. sh=     Set height for scalable bitmaps,
  102.         default is height.
  103.  
  104.         0x0d followed by one int
  105.  
  106. dw=     Set change in width,
  107.         default is zero.
  108.  
  109.         0x0e followed by one int
  110.  
  111. dh=     Set change in height, if exactly 255 then height is made
  112.         porportional to orignal dimesions.
  113.         Default is zero.
  114.  
  115.         0x0f followed by one int
  116.  
  117.         End scalable only commands ----------------
  118.  
  119.  
  120. until x,y
  121.         Repeat current setup until x=x AND y=y.
  122.         if dy = 0, be sure that y=y.
  123.         Be careful not to create an infinite loop.
  124.  
  125.         With out this or the next command nothing is actually drawn.
  126.  
  127.         0x10 followed by two ints
  128.  
  129.  
  130. before tick
  131.  
  132.         Repeat current setup until the tick specified.
  133.  
  134.         0x11 followed by one LONG int
  135.  
  136. palette fname
  137.         Load the palette, and make current
  138.         This command can be outside of a set.
  139.         0x12 followed by filename ASCIIZ
  140.  
  141. fadein fname
  142.         Load palette, and fade it in.
  143.         This command can be outside of a set.
  144.  
  145. fadeout
  146.         Fade to black.
  147.         This command can be outside of a set.
  148.  
  149. black   Set palette to all black
  150.         This command can be outside of a set.
  151.  
  152.  
  153. --------------------------------------------------------------
  154. Example of a SPC script.
  155.  
  156. e.g.
  157.  
  158. * start of file -------------------------------------------
  159. setstart
  160. load shape1.pbm
  161. x=-30
  162. y=20
  163. dx=1
  164. until 200, 20
  165. setend
  166.  
  167. setstart
  168. load shape2.m13
  169. x=150
  170. y=120
  171. w=2
  172. h=2
  173. dx=-1
  174. dy=-1
  175. dw=1
  176. dh=1
  177. before 200
  178. dx=-1
  179. dy=-1
  180. until -100, -100
  181.  
  182. quit
  183.  
  184. setend
  185.  
  186. * load background pic
  187. back rope.lbm 10,10
  188.  
  189. * start all sets
  190. start
  191.  
  192. * end of file ----------------------------------------------
  193.  
  194.  
  195. Script overview
  196.  
  197. Define all your sets, each one has a setstart/setend pair.
  198. At least one set must have a quit command.
  199. After the last set do initial commands.
  200. The start command starts all the sets running, and continues until
  201. a quit command is encountered.
  202.  
  203.  
  204. ------------------------------------------------------------
  205. file format
  206. byte    - number of sets
  207. commands
  208. setstart is followed by size of set, 2 bytes int
  209. start
  210. everything past here ignored
  211.  
  212. ---------------------- EOF ----------------------------------------- 
  213.